//Otra modificacion
import javax.microedition.lcdui.Graphics;


public class Cuadro {
        private int x;
    private int y;
    private int anchoPantalla;
    private int altoPantalla;
    private int color;


    public Cuadro(int x, int y, int ancho, int alto, int color){
        this.x = x;
        this.y = y;
        this.anchoPantalla = ancho;
        this.altoPantalla = alto;
        this.color = color;
    }


    public void dibujar(Graphics g){
        g.setColor(0xFFFFFF);
        g.fillRect(x, y, anchoPantalla, altoPantalla);
    }

    public void moverArriba(){
        y-=2;
    }

    public void moverAbajo(){
        y+=2;
    }

    public void moverDerecha(){
        x+=2;
    }

    public void moverIzquierda(){
        x-=2;
    }

    public void reset(){
        x = 0;
        y = 0;
    }

    public int getAltoPantalla() {
        return altoPantalla;
    }

    public void setAltoPantalla(int altoPantalla) {
        this.altoPantalla = altoPantalla;
    }

    public int getAnchoPantalla() {
        return anchoPantalla;
    }

    public void setAnchoPantalla(int anchoPantalla) {
        this.anchoPantalla = anchoPantalla;
    }

    public int getColor() {
        return color;
    }

    public void setColor(int color) {
        this.color = color;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }



}

